import { Table, message, Popconfirm, Space, Modal, Row, Col, Form, Input, Checkbox, Tooltip, Image as AntdImage } from "antd";
import { useModel, Outlet, useLocation, history } from "umi";
import { Card as SemiCard, ButtonGroup, Button } from "@douyinfe/semi-ui";
import { IconRefresh, IconPlusCircle, IconDelete, IconEdit, IconEyeOpened, IconTick } from "@douyinfe/semi-icons";
import { useReactive } from "ahooks";
import { useEffect, useState } from "react";
import { InputNumber } from "@douyinfe/semi-ui";

const EditCommodity = () => {
    const { onCloseGlobalModal } = useModel("global.modal");
    const [selectedMerchant, setSelectedMerchant] = useState(null);
    const [form] = Form.useForm();
    const { imageBase64 } = useModel("global");

    const loadData = () => {};

    const state = useReactive({
        dataLoading: false,
    });
    useEffect(() => {
        loadData();
    }, []);

    const onFinish = async (record) => {
        console.log(111);
    };

    return (
        <div style={{ padding: 20 }}>
            <Form form={form} layout="horizontal" onFinish={onFinish} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
                <Form.Item label="商品数量" name="ccName" validateTrigger="onBlur" rules={[{ required: true }]}>
                    <InputNumber placeholder="请输入顺序序号" />
                </Form.Item>
                <Form.Item label="商品套餐单价" name="ccName" validateTrigger="onBlur" rules={[{ required: true }]}>
                    <InputNumber placeholder="请输入顺序序号" />
                </Form.Item>

                <div style={{ marginTop: 20, textAlign: "center" }}>
                    <Space>
                        <Button loading={state.submitLoading} type="primary" htmlType="submit" style={{ width: "100%" }}>
                            提交
                        </Button>
                        <Button loading={state.submitLoading} onClick={onCloseGlobalModal}>
                            取消
                        </Button>
                    </Space>
                </div>
            </Form>
        </div>
    );
};

export default EditCommodity;
